import { ProductionType } from '@/config';

export const searchConfig: PageConfig = {
    items: [
        {
            itemType: 'text',
            modelKey: 'materialName',
            elInputProps: {
                placeholder: '请输入物料名称'
            },
            columnProps: {
                label: '物料名称'
            }
        },
        {
            itemType: 'text',
            modelKey: 'materialCode',
            elInputProps: {
                placeholder: '请输入物料编码'
            },
            columnProps: {
                label: '物料编码'
            }
        },
        {
            itemType: 'text',
            modelKey: 'creator',
            elInputProps: {
                placeholder: '请输入创建人'
            },
            columnProps: {
                label: '创建人'
            }
        },
        {
            itemType: 'select',
            modelKey: 'productionType',
            elSelectProps: {
                placeholder: '请选择生产类型',
                options: [
                    {
                        label: ProductionType['HANDMADE'],
                        value: ProductionType['HANDMADE']
                    },
                    {
                        label: ProductionType['OUTSOURCE'],
                        value: ProductionType['OUTSOURCE']
                    },
                    {
                        label: ProductionType['BUYOUT'],
                        value: ProductionType['BUYOUT']
                    }
                ]
            },
            columnProps: {
                label: '生产类型'
            }
        },
        {
            itemType: 'select',
            modelKey: 'manufacturingStrategy',
            elSelectProps: {
                placeholder: '请选择制造策略',
                options: [
                    {
                        label: 'MTS',
                        value: 'MTS'
                    },
                    {
                        label: 'MTO',
                        value: 'MTO'
                    }
                ]
            },
            columnProps: {
                label: '制造策略'
            }
        },
        {
            itemType: 'date',
            modelKey: 'createTime',
            dateRange: true,
            elDatePickerProps: {
                type: 'daterange',
                startPlaceholder: '开始时间',
                rangeSeparator: '-',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '创建日期'
            }
        }
    ]
};
